{include file="public/header" title='后台首页' keywords='关键字'}
<script src="__JS__/pintuer.js"></script>
</head>
<body>
<div class="bg"></div>
<div class="container">
    <div class="line bouncein">
        <div class="xs6 xm4 xs3-move xm4-move">
            <div style="height:150px;"></div>
            <div class="media media-y margin-big-bottom">
            </div>
            <form action="{:url('loginEdit')}" method="post">
                <input type="hidden" name="__token__" value="{:token()}" />
                <div class="panel loginbox" style="position: relative">
                    <div class="text-center margin-big padding-big-top"><h1>后台管理中心</h1></div>
                    <div class="panel-body" style="padding:30px; padding-bottom:10px; padding-top:10px;">
                        <div class="form-group">
                            <div class="field field-icon-right">
                                <input type="text" class="input input-big account" name="name" id="name" placeholder="登录账号" data-validate="required:请填写账号" />
                                <span class="icon icon-user margin-small"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="field field-icon-right">
                                <input type="text" id="email" class="input input-big account" name="email" placeholder="邮箱" data-validate="required:请填写邮箱" />
                                <span class="icon icon-file margin-small"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="field field-icon-right">
                                <input type="password" class="input input-big account" name="password" placeholder="修改密码" data-validate="required:请填写密码" />
                                <span class="icon icon-key margin-small"></span>
                            </div>
                        </div>
                        <div class="form-group" id="for1">
                            <div class="field field-icon-right">
                                <input type="text" class="input-big" style="width: 150px;" name="code" placeholder="验证码" data-validate="required:请填写邮箱验证码" />
                                <!--<span class="icon icon-bell margin-small" id="code" target="_self"></span>-->
                                <button type="button" class="button input-big" id="code" style="float: right">发送验证码</button>
                                <!--<input type="button" class="button input-big" style="width: 100px;float: right" value="获取验证码">-->
                            </div>
                        </div>
                    </div>
                    <div style="padding:30px;"><input type="submit" class="button button-block bg-main text-big input-big sub" value="修改"></div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    $("#code").click(function () {
        var name = $("#name").val();
        var email = $("#email").val();
        $.ajax({
            type: 'post',
            url: '{:url("ajaxEmail")}',
            data: {email:email,name:name},
            dataType: 'json',
            success: function (data) {
                if (data.code==1){
                    $("#code").prop('disabled',true);
                    $("#code").text("请在一分钟内填写");
                    setTimeout(function () {
                        $("#code").prop('disabled',false);
                        $("#code").text("发送验证码");
                    },10000);
                    alert(data.msg);
                }else{
                    alert(data.msg);
                    $("#code").prop('disabled',false);
                }
            }
        })
    });
</script>
</body>
</html>